<template>
	<!-- 普通商城产品列表（常规产品和抢购产品） -->
	<view class="sww-prod-box" :style="[customStyle]">
		<prod-list :dataList="dataList" :layout="row ? 2 : 1"></prod-list>

		<sww-load-more :params="dataListParams" @load="$loadMore"></sww-load-more>
	</view>
</template>
<script>
import { pagingMixin } from '../../mixins/pagingMixin';
import prodList from '@/pagecomponents/prodList/index.vue';
export default {
	mixins: [pagingMixin],
	components: { prodList },
	props: {
		row: {
			// 排列方式 默认一行两列，row为true代表一行一列
			type: Boolean,
			default: false
		},
		customStyle: {
			// 自定义最外层样式
			type: Object,
			default: () => {}
		},
		params: {
			// 接口参数
			type: Object,
			default: () => {}
		}
	},
	data() {
		return {
			dataList: []
		};
	},
	mounted() {
		this.$initPage();
	},
	methods: {
		$initPage() {
			this._init_data('GetProductList', this.params, {});
		},
		$loadMore() {
			this._load_data();
		}
	}
};
</script>
<style lang="scss" scoped>
.sww-prod-box {
	width: 100%;
}
</style>
